﻿<div style="height=100%;overflow:auto" class="box-panel">
    <Tab>
        <TabItem Text="工具箱">
            @foreach (ComponentType item in Enum.GetValues(typeof(ComponentType)))
            {
                <div @key="item" @ondragstart="()=>{
                    if (BigScreen!=null)
                                        {
                                        BigScreen.SelectedByToolBox=item;
                                        BigScreen.IsSelectedByToolBox=true;
                                        }


                }" draggable="true" @ondragend="()=>{
         if (BigScreen!=null)
                                        {
                                        BigScreen.IsSelectedByToolBox=false;
                                        }
                }">
                    <span>@item.ToString()</span>
                </div>
            }
        </TabItem>
    </Tab>

</div>

@code {
    [Parameter]
    public BigScreen? BigScreen { get; set; }
    public List<ComponentInfo> ComponentInfos { get; set; } = new();
}
